package com.heima.wemedia.utils;

import com.heima.model.wemedia.pojos.WmUser;

public class WmThreadLocalUtil {

    private WmThreadLocalUtil() {
    }

    private static final  ThreadLocal<WmUser> LOCAL = new ThreadLocal<WmUser>();

//    对应的set get
    public static void set(WmUser wmUser){
        LOCAL.set(wmUser);
    }

    public static WmUser get(){
        return LOCAL.get();
    }

//    在来个释放线程的
    public static void clear(){
        LOCAL.remove();
    }



}
